package cn.alcatraz.feign.impl;

import cn.alcatraz.domain.AjaxResult;
import cn.alcatraz.domain.Store;
import cn.alcatraz.feign.feignClients;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class feignClientsImpl implements FallbackFactory<feignClients> {

    @Override
    public feignClients create(Throwable throwable) {
        return new feignClients() {
            @Override
            public AjaxResult save(Store store) {
                return AjaxResult.myself().setSuccess(false).setMessage("系统繁忙");
            }
        };
    }
}
